package com.sinosoft.hydra.um.services.component.dataimport.resolvers;

import java.io.Serializable;

/**
 * Created by Administrator on 2015/1/10.
 */
public class ValidateResult implements Serializable {

    private String errors;
    private boolean valid;

    public ValidateResult(String errors, boolean valid) {
        this.errors = errors;
        this.valid = valid;
    }

    public String getErrors() {
        return errors;
    }

    public boolean isValid() {
        return valid;
    }

    public static ValidateResult PASS(){
        return new ValidateResult(null, true);
    }

    public static ValidateResult ERROR(String error){
        return new ValidateResult(error, false);
    }
}
